package com.topisv.tms.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.topisv.tms.entity.LogosticsInfo;
import com.topisv.tms.repository.LogosticsInfoDao;
import com.topisv.tms.service.base.BaseService;

//Spring Bean的标识.
@Component
// 默认将类中的所有public函数纳入事务管理.
@Transactional(readOnly=true)
public class LogosticsInfoService extends BaseService{
	@Autowired
	private LogosticsInfoDao logosticsInfoDao;
	
	@Transactional(readOnly=false)
	public void saveLogosticsInfo(LogosticsInfo logosticsInfo){
		logosticsInfoDao.save(logosticsInfo);
	}
	
	public LogosticsInfo findByExpressnoAndLogosticsInfo(String expressNo,String aboutCode,String logosticsInfo){
		return logosticsInfoDao.findByExpressNoAndLogosticsInfo(expressNo, aboutCode,logosticsInfo);
	}
}
